﻿using System;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SqlSugar;

namespace Aioms.Models
{
    ///<summary>
    ///
    ///</summary>
    [SugarTable("device_standard_result")]
    public class DeviceStandardResult
    {
        public DeviceStandardResult()
        {
            this.Created = DateTime.Now;
            this.Updated = DateTime.Now;

        }
        /// <summary>
        /// Desc:ID
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        public long Id { get; set; }

        /// <summary>
        /// Desc:企业id
        /// Default:
        /// Nullable:True
        /// </summary>             
        [SugarColumn(ColumnName = "eid")]
        public int Eid { get; set; }

        /// <summary>
        /// 工单ID
        /// </summary>     
        [SugarColumn(ColumnName = "woid")]
        public int Woid { get; set; }

        /// <summary>
        /// 设备ID
        /// </summary>            
        [SugarColumn(ColumnName = "dvid")]
        public long Dvid { get; set; }

        /// <summary>
        /// 设备类型ID
        /// </summary>            
        [SugarColumn(ColumnName = "dvtid")]
        public int Dvtid { get; set; }

        /// <summary>
        /// 区域ID
        /// </summary>             
        [SugarColumn(ColumnName = "aeid")]
        public int Aeid { get; set; }

        /// <summary>
        /// 巡检点ID
        /// </summary> 
        //[FromForm(Name = "ipid")]
        //[JsonProperty("ipid")]
        //public int Ipid { get; set; }

        /// <summary>
        /// 来源：巡检标准（xunjian）、点检标准（dianjian）
        /// </summary>            
        [SugarColumn(ColumnName = "source")]
        public string Source { get; set; }

        /// <summary>
        /// 巡检/点检标准ID
        /// </summary>             
        //[SugarColumn(ColumnName = "bzid")]
        //public int Bzid { get; set; }

        /// <summary>
        /// 巡检/点检结果
        /// </summary>             
        [SugarColumn(ColumnName = "result")]
        public string Result { get; set; }

        /// <summary>
        /// Desc:创建时间
        /// Default:CURRENT_TIMESTAMP
        /// Nullable:True
        /// </summary>            
        [SugarColumn(ColumnName = "created")]
        [JsonProperty("created")]
        public DateTime? Created { get; set; }

        /// <summary>
        /// Desc:更新时间
        /// Default:CURRENT_TIMESTAMP
        /// Nullable:True
        /// </summary>             
        [SugarColumn(ColumnName = "updated")]
        [JsonProperty("updated")]
        public DateTime? Updated { get; set; }

    }
}
